<div ng-include="'html/component/nav.html'" ng-controller="NavCtrl"></div>
<ul class="set_item" ng-include="'html/component/left_nav.html'" ng-controller="SettingNavCtrl"></ul>
<div class="set_box">
    <h1 class="set_title"><!--打印信息-->{{language.TIPS_SET_PRINT}}</h1>
    <div class="set_cont">
        <form name="none" class="print_table_wrap">
            <table class="print_table">
                <tr>
                    <td class="name"><label><!--自动打印小票-->{{language.TIPS_SET_AUTO_PRINT_RECEIPT}}:</label></td>
                    <td class="val">
                        <p class="radio_wrap">
                            <input ng-model="printData.check" type="radio" name="txt_print_switch" class="txt_print_switch" id="txt_print_switch0" value="0"  />
                            <label for="txt_print_switch0" ng-class="{true:'curr',false:''}[printData.check==0]"><!--否-->{{language.TIPS_SET_NO}} </label>
                            <input ng-model="printData.check" type="radio" name="txt_print_switch" class="txt_print_switch" id="txt_print_switch1" value="1" />
                            <label for="txt_print_switch1" ng-class="{true:'curr',false:''}[printData.check==1]"><!--是-->{{language.TIPS_SET_YES}} </label>
                        </p><i class="help" id="help_autoPrint" ng-click="help_prompt(language.HELP_PROMPT_AUTOPRINT,'help_autoPrint')"></i></td>
                </tr>
                <tr>
                    <td class="name"><label>打印方式<!--是否用USB打印-->:</label></td>
                    <td class="val">
                        <p class="radio_wrap">
                            <input ng-model="printData.printType" type="radio" name="print_switch3" class="print_switch3" id="print_switch3" value="3" />
                            <label for="print_switch3" ng-class="{true:'curr',false:''}[printData.printType==3]">USB打印</label>
                            <input ng-model="printData.printType" type="radio" name="print_switch2" class="print_switch2" id="print_switch2" value="2" />
                            <label for="print_switch2" ng-class="{true:'curr',false:''}[printData.printType==2]">飞凡打印</label>
                            <input ng-model="printData.printType" type="radio" name="print_switch0" class="print_switch0" id="print_switch0" value="1"  />
                            <label for="print_switch0" ng-class="{true:'curr',false:''}[printData.printType==1]">蓝牙打印</label>
                        </p><i class="help" id="help_printType" ng-click="help_prompt('选择后设置对应的打印方式','help_printType')"></i></td>
                </tr>
                <tr>
                    <td class="name"><label><!--小票模板-->{{language.TIPS_SET_RECEIPT_MODULE}}:</label></td>
                    <td class="val">
                        <select ng-model="printData.selectvalue" ng-options="tpl.id as tpl.name for tpl in printTemplate.template_options">
                        </select>
                        <i class="help" id="help_receiptModule" ng-click="help_prompt(language.HELP_PROMPT_RECEIPTMODULE,'help_receiptModule')"></i>
                    </td>
                </tr>
                <tr>
                    <td class="name"><label><!--库存模板-->{{language.TIPS_SET_STOCK_MODULE}}:</label></td>
                    <td class="val">
                        <select ng-model="printData.stockvalue" ng-options="tpl.id as tpl.name for tpl in printTemplate.stock_options">
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="name"><label for="txt_shop_tel"><!--店铺电话-->{{language.TIPS_SET_SHOP_TEL}}:</label></td>
                    <td class="val">
                        <input type="text" id="txt_shop_tel" ng-model="printData.tel"/>
                    </td>
                </tr>
                <tr>
                    <td class="name"><label for="txt_shop_addr"><!--店铺地址-->{{language.TIPS_SET_SHOP_ADDRESS}}:</label></td>
                    <td class="val">
                        <input type="text" id="txt_shop_addr" ng-model="printData.addr"/>
                    </td>
                </tr>
                
				 <tr>
                    <td class="name"><label for="txt_shop_tel"> 打印份数 </label></td>
                    <td class="val">
                        <input type="text" id="txt_shop_tel" onkeyup='this.value=this.value.replace(/\D/gi,"")' ng-model="printData.num"/>
                    </td>
                </tr>

<!--           店铺网址从后台获取，无需在此设置     
			    <tr>
                    <td class="name"><label for="txt_shop_web_site">店铺网址:</label></td>
                    <td class="val">
                        <input type="text" id="txt_shop_web_site" ng-model="printData.web_site"/>
                    </td>
                </tr>-->
                <tr ng-show = "printData.printType==1">
                    <td class="name"><label for="btn_print_select"><!--蓝牙打印机配对-->{{language.TIPS_SET_BLUETOOTG_PRINT_PAIR}}:</label></td>
                    <td class="val">
                        <input type="button" ng-model="printData.bluetooth" value="{{language.TIPS_SET_BLUETOOTG_PAIR}}" ng-click="btn_bluetooth()" />
                        <i class="help" id="help_bluetoothPrint" ng-click="help_prompt(language.HELP_PROMPT_BLUETOOTHPRINT,'help_bluetoothPrint')"></i>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <button type="button" id="btn_setting_save" class="ui-btn ui-corner-all ui-btn-a" ng-click="processForm()">
                            <!--保存-->{{language.TIPS_SAVE}}
                        </button>
                        <button type="button" id="btn_print_reset" class="ui-btn ui-corner-all ui-btn-a" ng-click="reset()">
                            <!--重置-->{{language.ACT_RESET}}
                        </button>
                        <button type="button" id="btn_print_test" class="ui-btn ui-corner-all ui-btn-a" ng-click="test()">
                            <!--打印测试小票-->{{language.TIPS_SET_PRINT_TEST_PRIECT}}
                        </button></td>
                </tr>
            </table>
        </form>
    </div>
</div>

